-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(telemetry): add configurability of span attributes in logs #5867
Conversation
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, let's get @shorgi to look at the docs text!
I like that you could use the config to show attribute overriding
docs/source/configuration/telemetry/exporters/logging/stdout.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/logging/stdout.mdx
Outdated
Show resolved
Hide resolved
docs/source/configuration/telemetry/exporters/logging/stdout.mdx
Outdated
Show resolved
Hide resolved
enabled: true | ||
format: | ||
json: | ||
display_span_list: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should document the valid or recommended setting of display_span_list
. I assume it's either recommended or required to be false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because usually when using span_attributes feature you probably don't want to display all the span list. Nothing prevents you from doing it, it's still valid but pretty useless
docs/source/configuration/telemetry/exporters/logging/stdout.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Co-authored-by: Edward Huang <edward.huang@apollographql.com>
The
telemetry.exporters.logging.stdout.format.json.span_attributes
option is useful if you don't want to display all spans attributes but only some of them. It takes an array of attribute name to include as a root logging attribute.This will search for the first attribute in the list of span attributes from the root span to the current one and attach it to the outmost json object for the log event.
If you set the same attribute on different spans at different level, then the identical attribute from child spans will take precedence over the one found previously in parent spans.
For example, if you have spans that contains
span_attr_1
attribute and you only want to display this span attribute:Example output with a list of spans:
Fixes #5540
ROUTER-418
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩